common: mmc: unsigned char compared against 0
authorPeng Fan <[email protected]>
Wed, 25 Nov 2015 09:16:21 +0000 (17:16 +0800)
committerTom Rini <[email protected]>
Sat, 5 Dec 2015 23:22:24 +0000 (18:22 -0500)
"enable" is unsigned char type and its value will not be
negative, so discard "enable < 0".

Signed-off-by: Peng Fan <[email protected]>
Cc: Diego Santa Cruz <[email protected]>
Cc: Pantelis Antoniou <[email protected]>
Cc: Andrew Gabbasov <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
common/cmd_mmc.c

index dfc1ec850e20a939bcecf24c1d377da84d034fd7..a6b7313e4a44d1f895a6a9e2a55311b85bcf5487 100644 (file)
@@ -747,7 +747,7 @@ static int do_mmc_rst_func(cmd_tbl_t *cmdtp, int flag,
        dev = simple_strtoul(argv[1], NULL, 10);
        enable = simple_strtoul(argv[2], NULL, 10);
 
-       if (enable > 2 || enable < 0) {
+       if (enable > 2) {
                puts("Invalid RST_n_ENABLE value\n");
                return CMD_RET_USAGE;
        }